//
//  SXCallbackWithBean.h
//  SXIotSDK
//
//  Created by 林鑫 on 2019/12/4.
//

#import <Foundation/Foundation.h>
#import "SXSOnDataLoadedListener.h"

NS_ASSUME_NONNULL_BEGIN

@interface SXCallbackWithBean : NSObject<ComBoneylinkSxiotsdkshareListenerSXSOnDataLoadedListener>

typedef void(^CallbackWithBeanType)(id, NSError*);
@property (nonatomic, copy) CallbackWithBeanType callback;
@property (nonatomic, retain) Class toClass;
@property (nonatomic, assign) BOOL isList;

- (instancetype)initWithCallback:(void(^)(id, NSError* error))callback withBeanClass:(Class)beanClass;
- (instancetype)initWithCallbackList:(void(^)(id, NSError* error))callback withBeanClass:(Class)beanClass;
- (instancetype)initWithCallback:(void(^)(id, NSError* error))callback;
- (instancetype)initWithCallbackList:(void(^)(id, NSError* error))callback;

@end

NS_ASSUME_NONNULL_END
